import pygame
from enum import Enum

# 颜色定义
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
GRAY = (200, 200, 200)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
LIGHT_GRAY = (230, 230, 230)
DARK_GRAY = (100, 100, 100)

# 游戏常量
SCREEN_WIDTH = 800  # 调整为1280
SCREEN_HEIGHT = 600  # 调整为960
INITIAL_GRID_SIZE = 3
CELL_SIZE = 60
PLAYER_PANEL_WIDTH = 200
STATUS_PANEL_HEIGHT = 120

# 信息面板的宽度
STATUS_INFO_WIDTH = 250


# 中立棋子图标
NEUTRAL_PIECE_ICON = "@"

# 事件触发回合间隔
EVENT_TRIGGER_INTERVAL = 1

# 事件
RESTART_GAME_EVENT = pygame.USEREVENT + 1

## 网格点击事件

GRID_CELL_CLICKED_EVENT = pygame.USEREVENT + 2
SKILL_BUTTON_CLICKED_EVENT = pygame.USEREVENT + 3

# 回合事件
TURN_START_EVENT = pygame.USEREVENT + 10
TURN_END_EVENT = pygame.USEREVENT + 11

TIME_LIMIT_START_EVENT = pygame.USEREVENT + 12
TIME_LIMIT_END_EVENT = pygame.USEREVENT + 13
TIME_LIMIT_RUNNING_EVENT = pygame.USEREVENT + 14

# 技能常量
class Skill(Enum):
    CLEAR_ROW = "Clear Row"
    CLEAR_COLUMN = "Clear Column"
    EXPAND_GRID = "Expand Grid"
    MOVE_PIECE = "Move Piece"
    SWAP_PIECES = "Swap Pieces"